home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / biz / demo / think214.lzh / advance.thnkr < prev    next >
Text File  |  1989-12-02  |  737b  |  26 lines

  1. /****************************************************************/
  2. /* routine to advance cursor to next word                       */
  3. /*  Rexx errors are reported as RC= in the error message box    */
  4. /*  The return results of this program are reported on the      */
  5. /*  clipboard.                                                  */
  6. /****************************************************************/
  7. trace off
  8. options results
  9. 'get cursor'
  10. statement=result
  11. if rc = 0 then do
  12.    'cursor fetch'
  13.    i=result
  14.    j=index(statement,' ',i+1)
  15.    if j = 0 then exit 1
  16.    do while j <= length(statement)
  17.       if substr(statement,j,1) ~= ' ' then do
  18.          'cursor set' j-1
  19.          exit 0
  20.       end
  21.       j=j+1
  22.    end
  23.    return 2
  24. end
  25. return 3
  26.